import request from "../utils/request"
// 新增角色
interface RuleForm{
    roleName: string
    permission:Array<any>
    open:boolean
    
}
export const rolePost=(data:RuleForm)=>{
    return request.post("classes/roleList",data)
}
// 获取角色
export const roleGet=(objectId?:string)=>{
    let where=objectId?`/${objectId}`:""
    return request.get(`classes/roleList${where}`)
}
// 删除角色
export const roleDelete=(objectId:string)=>{
    return request.delete(`classes/roleList/${objectId}`)
}
// 新增用户表
interface UserType {
    roleName: string
    schoolName: string
    username: string
    password: string
    managerName: string
    tel: string
}
export const userPost=(data:UserType)=>{
    return request.post("classes/userList",data)
}
// 获取用户表
export const userGet=()=>{
    return request.get("classes/userList")
}

//获取校区信息
export const schoolNameGet=()=>{
    return request.get("/classes/school")
}